<template>
    <h1>子组件</h1>
    <p>num:{{ num }}</p>
    <p>bool:{{ bool }}</p>
    <p>str:{{ str }}</p>
    <p>messaage:{{ message }}</p>
    <p>list:{{ list }}</p>
    <button @click="customEvent(num)">点击传参</button>
</template>
<script setup>
import {ref} from 'vue'
let num = ref(1086)
// defineProps 宏函数
    defineProps({
        num:Number,
        bool:Boolean,
        str:String,
        message:String,
        list:Array,
        customEvent:Function
    })
</script>